Integrand size = 19, antiderivative size = 54 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {3 a^2 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{2 d} \]
Time = 0.18 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {3 a^2 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \sec (c+d x) \tan (c+d x)}{2 d} \]
(3*a^2*ArcTanh[Sin[c + d*x]])/(2*d) + (2*a^2*Tan[c + d*x])/d + (a^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)
Time = 0.40 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {3042, 4275, 3042, 4254, 24, 4534, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a \sec (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2dx\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle 2 a^2 \int \sec ^2(c+d x)dx+\int \sec (c+d x) \left (\sec ^2(c+d x) a^2+a^2\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx-\frac {2 a^2 \int 1d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx+\frac {2 a^2 \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {3}{2} a^2 \int \sec (c+d x)dx+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3}{2} a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {3 a^2 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\) |
(3*a^2*ArcTanh[Sin[c + d*x]])/(2*d) + (2*a^2*Tan[c + d*x])/d + (a^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)
3.1.13.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 0.54 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.30
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+2 a^{2} \tan \left (d x +c \right )+a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(70\) |
default | \(\frac {a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+2 a^{2} \tan \left (d x +c \right )+a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(70\) |
parts | \(\frac {a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {2 a^{2} \tan \left (d x +c \right )}{d}\) | \(75\) |
norman | \(\frac {\frac {5 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {3 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-\frac {3 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {3 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(95\) |
risch | \(-\frac {i a^{2} \left ({\mathrm e}^{3 i \left (d x +c \right )}-4 \,{\mathrm e}^{2 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}-4\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {3 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(99\) |
parallelrisch | \(\frac {a^{2} \left (-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (2 d x +2 c \right )+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (2 d x +2 c \right )+2 \sin \left (d x +c \right )+4 \sin \left (2 d x +2 c \right )-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )\right )}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(116\) |
1/d*(a^2*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+2*a^2*t an(d*x+c)+a^2*ln(sec(d*x+c)+tan(d*x+c)))
Time = 0.26 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.54 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {3 \, a^{2} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a^{2} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (4 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
1/4*(3*a^2*cos(d*x + c)^2*log(sin(d*x + c) + 1) - 3*a^2*cos(d*x + c)^2*log (-sin(d*x + c) + 1) + 2*(4*a^2*cos(d*x + c) + a^2)*sin(d*x + c))/(d*cos(d* x + c)^2)
\[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int \sec {\left (c + d x \right )}\, dx + \int 2 \sec ^{2}{\left (c + d x \right )}\, dx + \int \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(sec(c + d*x), x) + Integral(2*sec(c + d*x)**2, x) + Integra l(sec(c + d*x)**3, x))
Time = 0.26 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.50 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 4 \, a^{2} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) - 8 \, a^{2} \tan \left (d x + c\right )}{4 \, d} \]
-1/4*(a^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + l og(sin(d*x + c) - 1)) - 4*a^2*log(sec(d*x + c) + tan(d*x + c)) - 8*a^2*tan (d*x + c))/d
Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.67 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \]
1/2*(3*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*a^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(3*a^2*tan(1/2*d*x + 1/2*c)^3 - 5*a^2*tan(1/2*d*x + 1/2 *c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^2)/d
Time = 13.89 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.54 \[ \int \sec (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {3\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-5\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]